package com.ms.kafka;

import java.util.List;

import org.apache.kafka.clients.consumer.ConsumerRecords;
import org.apache.kafka.clients.consumer.KafkaConsumer;

import com.ms.kafka.core.KafkaSenderPool;

public interface KafkaApi {

	/**
	 * 创建kafka消费者
	 */
    KafkaConsumer<String, String> createKafkaConsumer(List<String> topic, String groupId) throws Exception;

	/**
	 * 获取数据
	 */
    ConsumerRecords<String, String> getData(KafkaConsumer<String, String> consumer);

	/**
	 * 创建生产者
	 */
    KafkaSenderPool createKafkaSenderPool() ;

	/**
	 * 创建生产者
	 * 
	 * @param sendNum 发送者数据
	 */
    KafkaSenderPool createKafkaSenderPool(int sendNum);

}
